using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._SpatialAnalystTools._Generalization
{
    /// <summary>
    /// <para>Thin</para>
    /// <para>Thins rasterized linear features by reducing the number of cells representing the width of the features.</para>
    /// <para>通过减少表示要素宽度的像元数来细化栅格化线性要素。</para>
    /// </summary>    
    [DisplayName("Thin")]
    public class Thin : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public Thin()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_raster">
        /// <para>Input raster</para>
        /// <para><xdoc>
        ///   <para>The input raster to be thinned.</para>
        ///   <para>It must be of integer type.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要细化的输入栅格。</para>
        ///   <para>它必须是整数类型。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_raster">
        /// <para>Output raster</para>
        /// <para><xdoc>
        ///   <para>The output thinned raster.</para>
        ///   <para>The output is always of integer type.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出对栅格进行细化。</para>
        ///   <para>输出始终为整数类型。</para>
        /// </xdoc></para>
        /// </param>
        public Thin(object _in_raster, object _out_raster)
        {
            this._in_raster = _in_raster;
            this._out_raster = _out_raster;
        }
        public override string ToolboxName => "Spatial Analyst Tools";

        public override string ToolName => "Thin";

        public override string CallName => "sa.Thin";

        public override List<string> AcceptEnvironments => ["autoCommit", "cellSize", "cellSizeProjectionMethod", "compression", "configKeyword", "extent", "geographicTransformations", "mask", "outputCoordinateSystem", "scratchWorkspace", "snapRaster", "tileSize", "workspace"];

        public override object[] ParameterInfo => [_in_raster, _out_raster, _background_value.GetGPValue(), _filter.GetGPValue(), _corners.GetGPValue(), _maximum_thickness];

        /// <summary>
        /// <para>Input raster</para>
        /// <para><xdoc>
        ///   <para>The input raster to be thinned.</para>
        ///   <para>It must be of integer type.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要细化的输入栅格。</para>
        ///   <para>它必须是整数类型。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_raster { get; set; }


        /// <summary>
        /// <para>Output raster</para>
        /// <para><xdoc>
        ///   <para>The output thinned raster.</para>
        ///   <para>The output is always of integer type.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出对栅格进行细化。</para>
        ///   <para>输出始终为整数类型。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_raster { get; set; }


        /// <summary>
        /// <para>Background value</para>
        /// <para><xdoc>
        ///   <para>Specifies the cell value that will identify the background cells. The linear features are formed from the foreground cells.</para>
        ///   <bulletList>
        ///     <bullet_item>Zero—The background is composed of cells of 0 or less, or NoData. All cells whose value is greater than 0 are the foreground.</bullet_item><para/>
        ///     <bullet_item>NoData— The background is composed of NoData cells. All cells with valid values belong to the foreground.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将标识背景单元格的单元格值。线性要素由前景单元格形成。</para>
        ///   <bulletList>
        ///     <bullet_item>零 - 背景由 0 或更小的单元格或 NoData 组成。所有值大于 0 的单元格都是前景。</bullet_item><para/>
        ///     <bullet_item>NoData— 背景由 NoData 单元格组成。所有具有有效值的单元格都属于前景。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Background value")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _background_value_value _background_value { get; set; } = _background_value_value._ZERO;

        public enum _background_value_value
        {
            /// <summary>
            /// <para>Zero</para>
            /// <para>Zero—The background is composed of cells of 0 or less, or NoData. All cells whose value is greater than 0 are the foreground.</para>
            /// <para>零 - 背景由 0 或更小的单元格或 NoData 组成。所有值大于 0 的单元格都是前景。</para>
            /// </summary>
            [Description("Zero")]
            [GPEnumValue("ZERO")]
            _ZERO,

            /// <summary>
            /// <para>NoData</para>
            /// <para>NoData— The background is composed of NoData cells. All cells with valid values belong to the foreground.</para>
            /// <para>NoData— 背景由 NoData 单元格组成。所有具有有效值的单元格都属于前景。</para>
            /// </summary>
            [Description("NoData")]
            [GPEnumValue("NODATA")]
            _NODATA,

        }

        /// <summary>
        /// <para>Filter input first</para>
        /// <para><xdoc>
        ///   <para>Specifies whether a filter will be applied as the first phase of thinning.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—No filter will be applied. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—The raster will be filtered to smooth the boundaries between foreground and background cells. This option will eliminate minor irregularities from the output raster.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否将筛选器应用于变薄的第一阶段。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 不应用任何过滤器。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 栅格将被过滤以平滑前景像元和背景像元之间的边界。此选项将消除输出栅格中的细微不规则性。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Filter input first")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _filter_value _filter { get; set; } = _filter_value._false;

        public enum _filter_value
        {
            /// <summary>
            /// <para>NO_FILTER</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_FILTER")]
            [GPEnumValue("false")]
            _false,

            /// <summary>
            /// <para>FILTER</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("FILTER")]
            [GPEnumValue("true")]
            _true,

        }

        /// <summary>
        /// <para>Shape for corners</para>
        /// <para><xdoc>
        ///   <para>Specifies whether round or sharp turns will be made at turns or junctions.</para>
        ///   <para>It is also used during the vector conversion process to spline curves or create sharp intersections and corners.</para>
        ///   <bulletList>
        ///     <bullet_item>Round— Attempts to smooth corners and junctions. This is best for vectorizing natural features, such as contours or streams.</bullet_item><para/>
        ///     <bullet_item>Sharp— Attempts to preserve rectangular corners and junctions. This is best for vectorizing man-made features such as streets.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定在转弯处或交叉口是转弯还是急转弯。</para>
        ///   <para>它还在矢量转换过程中用于样条曲线或创建尖锐的交叉点和拐角。</para>
        ///   <bulletList>
        ///     <bullet_item>圆形 （Round） - 尝试平滑拐角和交汇点。这最适合矢量化自然要素，例如等高线或溪流。</bullet_item><para/>
        ///     <bullet_item>锐利 （Sharp） - 尝试保留矩形拐角和交汇点。这最适合矢量化人造要素，例如街道。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Shape for corners")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _corners_value _corners { get; set; } = _corners_value._ROUND;

        public enum _corners_value
        {
            /// <summary>
            /// <para>Round</para>
            /// <para>Round— Attempts to smooth corners and junctions. This is best for vectorizing natural features, such as contours or streams.</para>
            /// <para>圆形 （Round） - 尝试平滑拐角和交汇点。这最适合矢量化自然要素，例如等高线或溪流。</para>
            /// </summary>
            [Description("Round")]
            [GPEnumValue("ROUND")]
            _ROUND,

            /// <summary>
            /// <para>Sharp</para>
            /// <para>Sharp— Attempts to preserve rectangular corners and junctions. This is best for vectorizing man-made features such as streets.</para>
            /// <para>锐利 （Sharp） - 尝试保留矩形拐角和交汇点。这最适合矢量化人造要素，例如街道。</para>
            /// </summary>
            [Description("Sharp")]
            [GPEnumValue("SHARP")]
            _SHARP,

        }

        /// <summary>
        /// <para>Maximum thickness of input linear features</para>
        /// <para><xdoc>
        ///   <para>The maximum thickness, in map units, of linear features in the input raster.</para>
        ///   <para>The default thickness is ten times the cell size.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输入栅格中线性要素的最大厚度（以地图单位为单位）。</para>
        ///   <para>默认厚度是单元大小的十倍。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum thickness of input linear features")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _maximum_thickness { get; set; } = null;


        public Thin SetEnv(int? autoCommit = null, object cellSize = null, object compression = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object mask = null, object outputCoordinateSystem = null, object scratchWorkspace = null, object snapRaster = null, double[] tileSize = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, cellSize: cellSize, compression: compression, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, mask: mask, outputCoordinateSystem: outputCoordinateSystem, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, tileSize: tileSize, workspace: workspace);
            return this;
        }

    }

}